home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 355 / source / ifsdemo / gemprocs.def < prev    next >
Text File  |  1990-02-02  |  2KB  |  62 lines

  1. DEFINITION MODULE GEMProcs;
  2.  
  3. (* Several handy GEM procedures, primarily initialization and termination
  4.    routines. Also includes several other useful things. Michael A. Long,
  5.    1/8/88 *)
  6.  
  7. FROM SYSTEM IMPORT ADDRESS;
  8.  
  9. FROM GEMTypes IMPORT GRECT;
  10.  
  11. TYPE GEMRec = RECORD
  12.                  apid    : INTEGER; (* application id *)
  13.                  handle  : INTEGER; (* VDI handle *)
  14.                  hchar   : INTEGER; (* character height *)
  15.                  wchar   : INTEGER; (* character width *)
  16.                  hbox    : INTEGER; (* character cell height *)
  17.                  wbox    : INTEGER; (* character cell width *)
  18.                  level   : INTEGER; (* initialization level completed *)
  19.                  rez     : INTEGER; (* screen resolution *)
  20.                  xmax    : INTEGER; (* max x screen coordinate *)
  21.                  ymax    : INTEGER; (* max y screen coordinate *)
  22.                  iscolor : BOOLEAN; (* color screen? *)
  23.                  mhidden : BOOLEAN; (* mouse hidden? *)
  24.                  hasrsc  : BOOLEAN; (* resource loaded? *)
  25.               END;
  26.  
  27. VAR GEMState : GEMRec;
  28.  
  29. PROCEDURE GEMInit(rscname : ADDRESS) : BOOLEAN;
  30.  
  31. (* Initializes a GEM application. If rscname is not NIL, the resource will
  32.    be loaded as well. *)
  33.  
  34. PROCEDURE GEMTerm();
  35.  
  36. (* Terminates a GEM application. *)
  37.  
  38. PROCEDURE HideMouse();
  39.  
  40. (* Hide the mouse if it is not already hidden *)
  41.  
  42. PROCEDURE ShowMouse();
  43.  
  44. (* Show the mouse if it is not already showing *)
  45.  
  46. PROCEDURE RectIntersect(rect1     : GRECT;
  47.                         VAR rect2 : GRECT) : BOOLEAN;
  48.  
  49. (* Calculate the intersection of two rectangles. Returns TRUE if the
  50.    rectangles intersect. *)
  51.  
  52. PROCEDURE DoDialog(boxindex : INTEGER);
  53.  
  54. (* Show a simple dialog box *)
  55.  
  56. PROCEDURE AddrToInts(addr      : ADDRESS;
  57.                      VAR i1,i2 : INTEGER);
  58.  
  59. (* Converts an address to two integers *)
  60.  
  61. END GEMProcs.
  62.